Skip to content

fix: updated docs styling#2552

Closed
lolrobbe2 wants to merge 3 commits intopremake:masterfrom
lolrobbe2:fix--documentation-style
Closed

fix: updated docs styling#2552
lolrobbe2 wants to merge 3 commits intopremake:masterfrom
lolrobbe2:fix--documentation-style

Conversation

@lolrobbe2
Copy link
Contributor

What does this PR do?
this pr aims to rectify #2551

format:

params non determenistic:

for params wich are not deterministic IE have standard values like architecture the following style is used:

`<param_name>` **param_type** - <description>.

params deterministic:

for params wich are deterministic a MD table is used:

for architecture:
arch is the enum/param name

| Arch           | Description                                      |
|-------------|--------------------------------------------------|
| universal    | Universal binaries supported by iOS and macOS    |
| x86            | 32-bit x86 architecture                          |
| x86_64       | 64-bit x86 architecture                          |
| ARM          | 32-bit ARM architecture                          |
| ARM64       | 64-bit ARM architecture                          |
| RISCV64     | 64-bit RISC-V architecture                       |

@lolrobbe2 lolrobbe2 changed the title fix: updated docs styling for allmodulespublic -> customtoolnamespace… fix: updated docs styling Dec 2, 2025

```lua
architecture ("value")
architecture ("arch")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both "value"/"arch" are wrong there (not valid value). value/arch would be good (variable might have a correct value)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the idea is to be able to extract the name and get the following:

function architecture(arch) end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the quotes that bore me (which shouldn't avoid the name extraction).

Some APIs accept mostly any strings, some quote are OKish, some expect specific string, and providing unexpected ones is confusing IMO.
architecture ("value") was already wrong, and should have been architecture (value) (or architecture ("%{value}")).
And then you should only have renamed 'value' to 'arch'.

---
title: basedir
description: Sets the base directory for a configuration
keywords: [premake, basedir, base directory, path, configuration]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems you use config in other places

---
title: buildcustomizations
description: Imports custom .props files for Visual Studio.
keywords: [premake, buildcustomizations, visual studio, props, project]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'project' versus 'project config'?

@lolrobbe2
Copy link
Contributor Author

lolrobbe2 commented Dec 2, 2025

@Jarod42 maby i should also add a file wich describes the docs styling.

and could you help me figure out a way to enforce this maby via CI?

@lolrobbe2
Copy link
Contributor Author

@Jarod42 i started work on a js script that cheks the documentation format and logs potential errors and fails when errors are found.

i am also creating a helper script to streamline generating documentation files

@Jarod42
Copy link
Contributor

Jarod42 commented Dec 3, 2025

if you have a script to check documentation, it should probably be called from https://github.com/premake/premake-core/blob/master/.github/workflows/website.yml to ensure consistency.
It just has to return non-zero in case of failure from CI point of view, but messages help humans :-)

@lolrobbe2
Copy link
Contributor Author

if you have a script to check documentation, it should probably be called from https://github.com/premake/premake-core/blob/master/.github/workflows/website.yml to ensure consistency. It just has to return non-zero in case of failure from CI point of view, but messages help humans :-)

yes that is the goal, it is just a js script so can be run in the website task.

and logs precise errors when things are wrong

@@ -1,17 +1,25 @@
---
title: callingconvention
description: Sets whether or not the compiler should build STL modules.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm against adding title and description front-matters when they are not necessary. If not set, the title of the page is its filename and it's fine for 99% of our pages. Same goes for description. Docusaurus takes first paragraph as a description so there is no need to repeat it in the front-matter. It's bug-prone and this PR proves it. This description is copied from another page :)

---
title: callingconvention
description: Sets whether or not the compiler should build STL modules.
keywords: [premake, callingconvention, cdecl, fastcall, stdcall, vectorcall, function calling convention, compiler, project config]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is your algorithm for generating keywords for every page? Do they help you in any way? Because I am pretty much sure they will not affect searchability of our docs at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doccheck script i am working has flagged this and enforces this.

Making the docs uniform will also make readabilty better

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By "uniform" you mean adding (a possibly, in my opinion) redundant information to each page and having keywords just for the sake of having them? Because what "compiler" keyword even is? This information is transparent to the reader and it does not affect readability. While I'm happy to uniform the way parameter lists are formatted, I cannot convince myself to having front-matter everywhere just because some script enforces it. Why would it be flagged and enforced in the first place? Why do you think we need this?

@nickclark2016
Copy link
Member

I'm not particularly a fan of having multiple things doing the same (or similar) things. Can we not do this in the existing Lua task?

if you have a script to check documentation, it should probably be called from https://github.com/premake/premake-core/blob/master/.github/workflows/website.yml to ensure consistency. It just has to return non-zero in case of failure from CI point of view, but messages help humans :-)

yes that is the goal, it is just a js script so can be run in the website task.

and logs precise errors when things are wrong

@lolrobbe2
Copy link
Contributor Author

I'm not particularly a fan of having multiple things doing the same (or similar) things. Can we not do this in the existing Lua task?

if you have a script to check documentation, it should probably be called from https://github.com/premake/premake-core/blob/master/.github/workflows/website.yml to ensure consistency. It just has to return non-zero in case of failure from CI point of view, but messages help humans :-)

yes that is the goal, it is just a js script so can be run in the website task.

and logs precise errors when things are wrong

That script just checks that it exists at the moment

@nickclark2016
Copy link
Member

I'm not particularly a fan of having multiple things doing the same (or similar) things. Can we not do this in the existing Lua task?

if you have a script to check documentation, it should probably be called from https://github.com/premake/premake-core/blob/master/.github/workflows/website.yml to ensure consistency. It just has to return non-zero in case of failure from CI point of view, but messages help humans :-)

yes that is the goal, it is just a js script so can be run in the website task.
and logs precise errors when things are wrong

That script just checks that it exists at the moment

Why not update the script, rather than creating a new script?

@lolrobbe2
Copy link
Contributor Author

lolrobbe2 commented Dec 5, 2025

I'm not particularly a fan of having multiple things doing the same (or similar) things. Can we not do this in the existing Lua task?

if you have a script to check documentation, it should probably be called from https://github.com/premake/premake-core/blob/master/.github/workflows/website.yml to ensure consistency. It just has to return non-zero in case of failure from CI point of view, but messages help humans :-)

yes that is the goal, it is just a js script so can be run in the website task.
and logs precise errors when things are wrong

That script just checks that it exists at the moment

Why not update the script, rather than creating a new script?

Ill look into that. The current scripts are for brainstorming and testing before making it proper.

@samsinsane
Copy link
Member

I've commented on and closed the referenced issue, I'm going to close this PR too.

@samsinsane samsinsane closed this Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants